package com.ruoyi.system.service.estate.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.estate.ParkingMapper;
import com.ruoyi.system.domain.estate.Parking;
import com.ruoyi.system.service.estate.IParkingService;

/**
 * 车位管理Service业务层处理
 * 
 * @author ruoyi
 */
@Service
public class ParkingServiceImpl implements IParkingService 
{
    @Autowired
    private ParkingMapper parkingMapper;

    /**
     * 查询车位信息
     * 
     * @param parkingId 车位ID
     * @return 车位信息
     */
    @Override
    public Parking selectParkingById(Long parkingId)
    {
        return parkingMapper.selectParkingById(parkingId);
    }

    /**
     * 查询车位列表
     * 
     * @param parking 车位信息
     * @return 车位
     */
    @Override
    public List<Parking> selectParkingList(Parking parking)
    {
        return parkingMapper.selectParkingList(parking);
    }

    /**
     * 新增车位
     * 
     * @param parking 车位信息
     * @return 结果
     */
    @Override
    public int insertParking(Parking parking)
    {
        return parkingMapper.insertParking(parking);
    }

    /**
     * 修改车位
     * 
     * @param parking 车位信息
     * @return 结果
     */
    @Override
    public int updateParking(Parking parking)
    {
        return parkingMapper.updateParking(parking);
    }

    /**
     * 批量删除车位
     * 
     * @param parkingIds 需要删除的车位ID
     * @return 结果
     */
    @Override
    public int deleteParkingByIds(Long[] parkingIds)
    {
        return parkingMapper.deleteParkingByIds(parkingIds);
    }

    /**
     * 删除车位信息
     * 
     * @param parkingId 车位ID
     * @return 结果
     */
    @Override
    public int deleteParkingById(Long parkingId)
    {
        return parkingMapper.deleteParkingById(parkingId);
    }
} 